From 47a54bf876023b0cb457bc8a4f4264f9b2ed5438 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 17 Jul 2017 15:44:58 +0100 Subject: [PATCH] Move the include directive to the enum template There is no actual written guarantee in glib-mkenums that the template line specified using --fhead will be added after the templates specified inside the template file. Since the template file is only used once, we can simply move the `#include` directive inside the template, so that it is guaranteed to be in the right place. Closes: #1007 Approved by: cgwalters --- Makefile-libostree.am | 1 - src/libostree/ostree-enumtypes.c.template | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile-libostree.am b/Makefile-libostree.am index fab7bd3f..c83569ff 100644 --- a/Makefile-libostree.am +++ b/Makefile-libostree.am @@ -57,7 +57,6 @@ src/libostree/ostree-enumtypes.h: src/libostree/ostree-enumtypes.h.template $(EN src/libostree/ostree-enumtypes.c: src/libostree/ostree-enumtypes.c.template $(ENUM_TYPES) $(AM_V_GEN) $(GLIB_MKENUMS) \ --template $< \ - --fhead "#include \"ostree-enumtypes.h\"" \ $(ENUM_TYPES) > $@.tmp && mv $@.tmp $@ nodist_libostree_1_la_SOURCES = \ diff --git a/src/libostree/ostree-enumtypes.c.template b/src/libostree/ostree-enumtypes.c.template index 52da7de1..f7eecf24 100644 --- a/src/libostree/ostree-enumtypes.c.template +++ b/src/libostree/ostree-enumtypes.c.template @@ -23,6 +23,8 @@ #endif #include +#include "ostree-enumtypes.h" + /*** END file-header ***/ /*** BEGIN file-production ***/ -- 2.30.2